<%@page import="com.wframe.framework.util.UploadUtil"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w"%>
<%String path=request.getContextPath(); request.setAttribute("fileserver", UploadUtil.getConfig().getDownserver());%>
<script src="<%=path %>/plugins/cityselect/jquery.cityselect.js" type="text/javascript"></script>
<div class="easyui-tabs" id="pedit_tabs" data-options="fit:true,border:false,tools:'#productedittool'">
<div title="基本信息" class="ui-formContent">
	<form method="post" action="/user/UserPage@update.page" class="pageForm">
		<w:hidden bind="bean.id"/>
		<div class="ui-formContent" style="padding:10px 30px;">
			<div class="headT"><span></span><label>基本信息</label></div>
			<table width="80%" cellpadding="2" cellspacing="2">
			<tr>
				<td width="90">账号：</td><td width="30%"><w:write bind="bean.loginname"/></td>
				<td width="90">昵称：</td><td><w:text bind="bean.nickname"/></td>
			</tr>
			<tr>
				<td>头像：</td><td><w:notEqual bind="bean.photo" value=""><img src="${fileserver }<w:write bind="bean.photo"/>" style="width:36px;height:36px;"></w:notEqual></td>
				<td>性别：</td><td><w:radio bind="bean.sex" value="1" text="男"/><w:radio bind="bean.sex" value="2" text="女"/></td>
			</tr>
			<tr>
				<td>客户等级：</td><td><select name="bean.grade" style="width:200px;height:30px;"><option value=""></option><w:options bind="bean.grade" dict="UserGrade"/></select></td>
				<td>客户分组：</td><td><select name="bean.usergroup" style="width:200px;height:30px;"><option value=""></option><w:options bind="bean.usergroup" dict="UserGroup"/></select></td>
			</tr>
			<tr>
				<td>价格等级：</td><td><select name="bean.pricegrade" style="width:200px;height:30px;"><option value=""></option><w:options bind="bean.pricegrade" dict="PriceGrade"/></select></td>
				<td>注册时间：</td><td><w:write bind="bean.regtime" format="yyyy-MM-dd"/></td>
			</tr>
			<tr>
				<td>E-mail：</td><td><w:text bind="bean.email"/></td>
				<td>手机号码：</td><td><w:text bind="bean.phone"/></td>
			</tr>
			<tr>
				<td>账户余额：</td><td><w:text bind="bean.account_money" styleClass="easyui-numberbox" dataOptions="min:0,precision:2,prefix:'￥'"/></td>
				<td>积分：</td><td><w:text bind="bean.integral" styleClass="easyui-numberbox" dataOptions="min:0,precision:0"/></td>
			</tr>
			<tr>
				<td width="90">来源：</td><td width="30%"><w:write bind="bean.source" defaultVal="PC端" format="[未知,PC端,微信,后台]"/></td>
			</tr>
			</table>

			<div class="line8"></div><div class="line8"></div>
			<div class="headT"><span></span><label>企业信息</label></div>
			<table width="80%" cellpadding="2" cellspacing="2">
			<tr>
				<td width="90">企业名称：</td><td width="30%"><w:text bind="company.name"/></td>
				<td width="90">企业类型：</td><td><select name="company.type" style="width:200px;height:30px;"><option value=""></option><w:options bind="company.type" dict="CompanyType"/></select></td>
			</tr>
			<tr>
				<td>营业执照：</td><td colspan="3"><w:text bind="company.idnum" style="width:360px"/></td>
			</tr>
			<tr>
				<td>联系人：</td><td><w:text bind="company.contacts"/></td>
				<td>联系号码：</td><td><w:text bind="company.phone"/></td>
			</tr>
			<tr>
				<td>所属区域：</td><td colspan="3" id="usercompanyaddress">
					<table>
					<tr>
					<td>
						<select name="company.province" class="prov" style="width:120px;border:0px;height:30px;"><option value="">选择省份</option></select>
					</td><td><select name="company.city" class="city" style="width:120px;border:0px;height:30px;">
	               		<option value="">选择城市</option>
	            	</select>
	            	</td><td><select name="company.region" class="dist" style="width:120px;border:0px;height:30px;">
               			<option value="">选择地区</option>
            		</select>
            		</td>
            		</tr>
            		</table>
				</td>
			</tr>
			<tr>
				<td>详细地址：</td><td colspan="3"><w:text bind="company.address" style="width:360px"/></td>
			</tr>
			</table>
			<div class="line8"></div>
		</div>
	</form>
	<div style="margin-left:100px">
		<a href="javascript:;" class="easyui-linkbutton marginR16" iconCls="icon_save" onclick="$w.doWinForm();">保 存</a>
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon_cancel" onclick="$w.closeCurrWin()">取 消</a>
	</div>
	<div class="line8"></div><div class="line8"></div>
	<div class="line8"></div><div class="line8"></div>
</div>
<div title="资质管理" class="ui-formContent">
	<w:switch>
	<w:case bind="#qullist.size()>0">
	<div style="margin:20px">
	<table cellpadding="1" cellspacing="1" style="background:#dddddd">
		<tr class="ui-formContent">
			<td align="center" style="width:180px" height="30">资质类型</td>
			<td align="center" style="width:180px">证件号码</td>
			<td align="center" style="width:240px">证件有效期</td>
			<td align="center" style="width:170px">图片</td>
		</tr
		<w:iterate bind="#qullist" id="info">
			<tr>
				<td align="center" class="ui-formContent"><w:write bind="#info.type" dict="CerType"/></td>
				<td align="center" class="ui-formContent"><w:write bind="#info.idnum"/></td>
				<td align="center" class="ui-formContent"><w:write bind="#info.validity_start"/>至<w:write bind="#info.validity_end"/></td>
				<td align="center" class="ui-formContent"><w:notEqual bind="#info.img" value=""><img src="${fileserver }<w:write bind="#info.img"/>" style="width:150px"></w:notEqual> </td>
			</tr>
		</w:iterate>
	</table>
	</div>
	</w:case>
	<w:else>
		<div style="padding-left:50px;padding-top:20px;" class="nodata">没有上传相关资质信息！</div>
	</w:else>
	</w:switch>

</div>
</div>
<script>
	$("#usercompanyaddress").citySelect({prov:'<w:write bind="company.province"/>',city:'<w:write bind="company.city"/>',dist:'<w:write bind="company.region"/>',required:false});
</script>